<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/3/9
 * Time: 18:45
 */

namespace app\admin\model;


class PublicNotice extends DataBase
{
    protected $name = 'public_notice';
    protected $dateFormat;


    public function indexData()
    {
        $page_config = [
            'page' => input('offset', 1),
            'list_rows' => input('limit', 10),
        ];

        $order = ['status'=>'ASC','sort'=>'DESC'];
        $map = true;

        $data = $this->where($map)->order($order)->paginate($page_config);
        foreach($data as $k => $v){
            $data[$k]['create_time'] = date('Y-m-d H:i:s',intval($data[$k]['create_time']));
        }
        return $data;
    }
}